﻿<%@ Page Language="C#"  EnableEventValidation="false" AutoEventWireup="true" CodeFile="OutManage.aspx.cs" Inherits="Services_OutManage" %>
<%@ Register Src="../usercontrol/PageUrlGridView.ascx" TagName="PageUrlGridView" TagPrefix="uc1" %>
<html >
<head id="Head1" runat="server">
<title>商品品牌管理</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/changerows.js"></script>
<script type="text/javascript" src="../js/Check.js"></script>
  <script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript">
function CheckAll(form) {
    for (var i=0;i<form.elements.length;i++) {
	    var e = form.elements[i];
	    if (e.name != 'chkall' && e.type=='checkbox')
		    e.checked = form.chkall.checked;
    }
}
function PrintData(id)
{
    if(id!="")
    {
        openwin(800,550,"DrawPrint.aspx?id="+id);
    }
}
</script>
<link href="../js/loading.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="../js/loading.js" charset="gb2312"></script>
<body style="text-align: center">
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="2%" height="1%">
                    <img src="../images/module.gif" width="20" height="22"></td>
                <td >
                    &nbsp;<asp:Label ID="lblPath" runat="server"></asp:Label></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
		<table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td  align="right">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />出货日期：<asp:TextBox ID="yjTm1" runat="server" CssClass="input1" Width="80"  onclick="SelectDate(this.name)"></asp:TextBox>到<asp:TextBox ID="yjTm2" runat="server" CssClass="input1" Width="80" onclick="SelectDate(this.name)"></asp:TextBox>编号条码：<asp:TextBox ID="comodBarcode" runat="server" CssClass="input1" Width="80"></asp:TextBox>
                    名称：<asp:TextBox ID="catalogueName" runat="server" CssClass="input1" Width="80"></asp:TextBox>
                    单号：<asp:TextBox ID="OutCode" runat="server" CssClass="input1" Width="80"></asp:TextBox>
                    领货人：<asp:DropDownList ID="maintmen" runat="server">
                    </asp:DropDownList>
                    <asp:Button ID="btnSelec" runat="server" Text="搜索" CssClass="submit" CausesValidation="False" OnClick="btnSelec_Click" />
                    <asp:Button ID="Excel" runat="server" CssClass="inputExcel" OnClick="Excel_Click"
                        Text="导出" /></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
      </table>
        <asp:GridView ID="GvData" runat="server" CssClass="gridview" Width="99%" AutoGenerateColumns="False" RowStyle-HorizontalAlign="center" EmptyDataText="没有数据" OnRowDataBound="GvDataBand_RowDataBound" >
            <Columns>
               <asp:BoundField DataField="OutStockId" HeaderText="流水号" />
               <asp:BoundField DataField="OutCode" HeaderText="单号" />
               <asp:BoundField DataField="TypeName" HeaderText="备件分类" />
                <asp:BoundField DataField="catalogueName" HeaderText="备件名称" />
                <asp:BoundField DataField="comodBarcode" HeaderText="编号(条码)" />
                <asp:BoundField DataField="Units" HeaderText="单位" />
                <asp:BoundField DataField="OutNum" HeaderText="数量" />
                <asp:BoundField DataField="prices" HeaderText="单价" />
                <asp:BoundField DataField="TotalMoney" HeaderText="金额" />
                <asp:BoundField DataField="StaffName" HeaderText="领货人" />
                <asp:BoundField DataField="EditUserName" HeaderText="操作员" />
               <asp:TemplateField HeaderText="时间">
                    <ItemTemplate>
                        <asp:Label ID="lblTime" runat="server" Text= '<%# Bind("EditDate","{0:yyyy-MM-dd}") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="Remark" HeaderText="备注" /> 
                <asp:BoundField DataField="isEnd" ItemStyle-CssClass="F_red" HeaderText="状态" />
                <asp:BoundField DataField="AuditState" ItemStyle-CssClass="F_red" HeaderText="审核" />
                <asp:TemplateField HeaderText="操作" > 
                      <ItemTemplate>
                      <asp:LinkButton ID="Label5" runat="server" Text="修改" CommandArgument='<%#Eval("OutStockId") %>' OnClick="Edit_Click"></asp:LinkButton><a href="javascript:PrintData('<%#Eval("OutCode")%>')" class="F_Red">打印</a>
                    </ItemTemplate>
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <asp:CheckBox ID="ckFlag" runat="server"  />
                    </ItemTemplate>
                    <ItemStyle Width="40px" HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" Height="25px" />
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
         <table width="99%" border="0" cellspacing="0" cellpadding="0">
        <tr>
                <td align="center">
                  <uc1:PageUrlGridView ID="PageNavigator1" runat="server" DataId="GvData" ConnectionString="connstr" ShowType="Num" PageSize="20" />
                </td>
            <td height="5" align="right">  <input type="checkbox" name="chkall" onClick="CheckAll(this.form)" value="on"><font color="#FF0000">全选</font><asp:Button ID="Button2" runat="server" CssClass="submit" OnClick="btnAdd_Click" Text="添加" />
                <asp:Button ID="Button1" runat="server" CssClass="submit" OnClick="Button1_Click" Text="审核" /> <asp:Button ID="btnDel" runat="server" CssClass="submit" OnClick="btnDel_Click" OnClientClick="return confirm('确定要删除吗?')"   Text="删除" />
            </td>
      </tr>
      </table>
       <asp:HiddenField ID="hfxs" runat="server" />
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
 senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>